<nz-list style="padding-top: 30px" [nzLoading]="loading" [nzDataSource]="list"
         [nzGrid]="{gutter: 24, lg: 6, md: 8, sm: 12, xs: 24 }">
    <ng-template #item let-item>
        <nz-list-item>
            <nz-card nzHoverable style="width: 100%;position: relative">
                <span *ngIf="!isActive" [class]="item.isUse ? 'cl1': 'cl2' ">{{item.isUse ? '可用':'不可用'}}</span>
                <div class="pro-shadow" *ngIf="!isActive">
                    <a (click)="preview(item.p_id,true,item.isUse)"><i class="anticon anticon-eye"></i><br />预览</a>
                    <a (click) = 'quoteToMain(item.p_id)' *ngIf="item.isUse"><i  class="anticon anticon-plus" ></i><br />引用</a>
                </div>
                <div class="pro-shadow" *ngIf="isActive&&item.p_name!=''">
                    <a (click)="preview(item.p_id,false,true)"><i  class="anticon anticon-eye"></i><br />预览</a>
                    <a [routerLink] = "['../../add-project',false, item.p_id]"><i class="anticon anticon-edit"></i><br />编辑</a>
                    <!--<a (click) = "showList(item)"><i  class="anticon anticon-bell" ></i><br />授课</a>-->
                    <a (click)="deleteProjectById(item.p_id)"><i  class="anticon anticon-delete"></i><br />删除</a>
                </div>
                <ng-container  *ngIf="item.p_name == ''" >
                    <!--[routerLink]="['../../add-project', 0]"-->
                    <ng-template #cover>
                        <img alt="'添加项目'"
                        [routerLink] = "['../../add-project', false, 0]"
                        src="./assets/img/addPro.png">
                    </ng-template>
                    <nz-card-meta
                        [nzTitle]="'添加项目'"
                        [nzDescription]="item.subDescription">
                    </nz-card-meta>
                </ng-container>
                <ng-container  *ngIf="item.p_name!=''"  style="width: 100%">
                    <ng-template #cover>
                        <div  [appAutobg]="isActive? (IP_PORT + item.p_image):(IP_PORT + item.p_image)" >

                        </div>
                    </ng-template>
                    <nz-card-meta
                        [nzTitle]="nzTitle"
                        [nzDescription]="item.subDescription">
                        <ng-template #nzTitle><a routerLink="" style="color: #656565;">{{item.p_name}}</a></ng-template>
                    </nz-card-meta>

                </ng-container>
                <div class="card-item-content" [appMargin] top="10">
                    <span class="text-grey">{{item.p_date}}</span>
                </div>
                <!--<ng-container *ngIf="isActive&&item.p_name!=''">-->
                    <!--<nz-card-action>-->
                        <!--<nz-tooltip [nzTitle]="'预览'"  [routerLink] = "['../../map']"><i nz-tooltip class="anticon anticon-eye"></i></nz-tooltip>-->
                    <!--</nz-card-action>-->
                    <!--<nz-card-action>-->
                        <!--<nz-tooltip [nzTitle]="'编辑'"  [routerLink] = "['../../add-project', item.p_id]" ><i nz-tooltip class="anticon anticon-edit"></i></nz-tooltip>-->
                    <!--</nz-card-action>-->
                    <!--<nz-card-action>-->
                        <!--<nz-tooltip [nzTitle]="'授课'"><i nz-tooltip class="anticon anticon-bell"></i></nz-tooltip>-->
                    <!--</nz-card-action>-->
                    <!--<nz-card-action >-->
                        <!--<nz-tooltip [nzTitle]="'删除'" (click)="deleteProjectById(item.p_id)"><i nz-tooltip class="anticon anticon-delete"></i></nz-tooltip>-->
                    <!--</nz-card-action>-->
                <!--</ng-container>-->
                <!--<ng-container *ngIf="!isActive" >-->
                    <!--<nz-card-action>-->
                        <!--<nz-tooltip [nzTitle]="'查看'" [routerLink] = "['../../map']" ><i nz-tooltip class="anticon anticon-eye"></i></nz-tooltip>-->
                    <!--</nz-card-action>-->
                    <!--<nz-card-action >-->
                        <!--<nz-tooltip [nzTitle]="'引用'" (click) = 'quoteToMain(item.p_id)'><i nz-tooltip class="anticon anticon-plus" ></i></nz-tooltip>-->
                    <!--</nz-card-action>-->
                <!--</ng-container>-->

            </nz-card>
        </nz-list-item>
    </ng-template>
    <nz-modal [nzWrapClassName]="'vertical-center-modal'" [nzFooter]="''" [nzVisible]="showClass" [nzTitle]="'开始授课'" [nzConfirmLoading]="loading" [nzContent]="modalContent"
              (nzOnCancel)="showClass=false" (nzOnOk)="showClass=false" [nzStyle]="style" [nzOkText]="'确定'" [nzCancelText]="'取消'">
        <ng-template #modalContent>
            <button nz-button [nzType]="'primary'" [nzSize]="'large'" *ngFor="let data of classList" class="cla_name" (click) = "showCourList(data.cla_id)">
                {{data.cla_name}}
            </button>
            <nz-table #nzTable [nzDataSource]="courseList" [nzPageSize]="3"  [nzLoading]="_loading">
                <thead nz-thead>
                <tr>
                    <th  nz-th><span>课程名称</span></th>
                    <!--<th  nz-th><span>项目名称</span></th>-->
                    <!--<th  nz-th><span>项目属性</span></th>-->
                    <th  nz-th><span>操作</span></th>
                </tr>
                </thead>
                <tbody nz-tbody>
                <tr nz-tbody-tr *ngFor = "let i of courseList">
                    <td nz-td>{{i.cour_name}}</td>
                    <!--<td nz-td>p_name</td>-->
                    <!--<td nz-td >p_type</td>-->
                    <td nz-td>
                        <span (click)="play(i)">
                          <i class="anticon anticon-caret-right"></i>
                        </span>
                    </td>
                </tr>
                </tbody>
            </nz-table>
        </ng-template>
    </nz-modal>
</nz-list>
<nz-pagination *ngIf="list?.length!==0" class="pull-right" appMargin bottom="20" [(nzPageSize)]="pageSize" [(nzPageIndex)]="pageIndex" (nzPageIndexChange)="getData()" [nzTotal]="total"></nz-pagination>
<p *ngIf="list?.length===0" style="text-align: center;">暂无数据</p>
